package com.wl.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.sql.Date;

@Getter
@Setter
@TableName("lvuser")
public class Lvuser implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "uid",type = IdType.AUTO)
    private Integer uid;

    @NotEmpty(message = "用户名不能为空")
    @TableField(value = "uname")
    private String uname;

    @TableField(value = "gender")
    private Integer gender=0;

    @NotEmpty(message = "账号不能为空")
    @TableField(value = "zhanghao")
    private String zhanghao;

    @NotEmpty(message = "密码不能为空")
    @Length(min = 6,max = 20,message = "密码必须是6~20个字符")
    @TableField(value = "password")
    private String password;

    @TableField(value = "head")
    private String head="boy1.png";

    @TableField(value = "email")
    private String email;

    @TableField(value = "status")
    //0：正常  1：封禁
    private Integer status=0;

    @TableField(value = "level")
    private Integer level=0;

    @TableField(value = "role")
    //0：用户  1：管理员
    private Integer role=0;

    @TableField(value = "create_at")
    private Date createAt;

    @TableField(value = "update_at")
    private Date updateAt;

    @TableField(value = "birthday")
    private Date birthday;

    @TableField(value = "bio")
    private String bio;
}
